package com.lyx.question.feign;

import com.lyx.common.result.R;
import com.lyx.common.result.Result;
import com.lyx.common.to.UserTo;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;

import javax.servlet.http.HttpServletRequest;
import java.util.List;

/**
 * @author 14667
 * @date 2022/7/20 10:10
 */
@FeignClient(name = "user")
public interface UserFeignService {
    @GetMapping("user/userInfo")
    public Result getUserInfo(HttpServletRequest request);

    /**
     * 根据ids获取用户信息集合
     */
    @GetMapping("user/users")
    public R getUsers(@RequestParam List<Integer> ids);

    @GetMapping("user/userInfoById")
    public R getUserInfoById(@RequestParam Integer userId);
}
